home *** CD-ROM | disk | FTP | other *** search
- Path: EU.net!sun4nl!xs4all!usenet
- From: martijnl@xs4all.nl (Martijn Lievaart)
- Newsgroups: comp.lang.c++
- Subject: Re: writting to serial port, _bios_serialcom() ?
- Date: 7 Jan 1996 00:44:37 GMT
- Organization: XS4ALL, networking for the masses
- Message-ID: <4cn51l$he7@news.xs4all.nl>
- References: <17705140F1S86.1RFD1642@MtSACvm.MtSAC.edu>
- NNTP-Posting-Host: mas01-09.dial.xs4all.nl
- Keywords: serial bios rs-232
- X-Newsreader: WinVN 0.99.6
-
- In article <17705140F1S86.1RFD1642@MtSACvm.MtSAC.edu>,
- 1RFD1642@MtSACvm.MtSAC.edu says...
- >
- >Hi all:
- >
- >If this is the wrong place for this question, please point me to the right
- >one.
- >
-
- It is the wrong place, though I don't know what would be the right one.
-
- >I have a microcontroller connected to my PC via COM1. I was trying to
- >send bytes to it from my c++ program with _bios_serialcom() but i get
- >bit 15 set ( Time out error ). Connections are fine because if i use a
- >communications program in terminal mode the bytes arrive at the other end
- >with no problem.
-
- _bios_serialcom() works through the bios. That means no interupt support, just
- polling. This may or may not be the problem, but as a commprogram works (they
- just write directly to the hardware) I would say it is.
-
- If this is the problem, you should do the same, t.i. write to the hardware.
- Luckily there are a lot of freeware libraries out there that will encapsulate
- this for you.
-
- If possible, try to drop the baudrate to 300bps. If that works, programming
- the metal will solve the problem at higher baudrates.
-
- >Anyone has any ideas why i get a Time out error ? I thought i needed to
- >connect other lines in the serial port, i only have Rx,Tx and GND connected
- >, so i connected RTS. But still nothing.
- >
-
- Getting a good handshaked cable may also solve the problem, uh find the right
- newsgroup to ask the schematic.
-
- >Is there another function to use ( easier ) ?
- >
- >BTW when i send the settings to the port i get no errors... and this is
- >for BC++ 3.1 , for a DOS program. I used Watcom and i got the same results.
- >
- >Please reply to : 1rfd1642@ibm.mtsac.edu
- >
- >
- >Thanks in advance!!
-
- Serial support under DOS is about zilch. Entire books have been written about
- solving that. You might want to get one (I still use the MSDOS encyclopedia).
-
- Hope this helps,
- Martijn.
-
-